#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	char s[105],s1[105];
	scanf("%s %s", s, s1);
	int len = strlen(s);
	int len1 = strlen(s1);
	int i = 0, j = 0;
	int colen = 0, sum = 0;
	while (i < len)
	{
		if (s[i] == s1[j])
		{
			i++;
			j++;
			colen++;
			if (colen == len1)
			{
				sum++;
				j = 0;
				colen = 0;
			}
		}
		else i++;
	}
	printf("%d", sum);
	return 0;
}